<template>
  <div class="container">
    <div class="app-container">
      {{ count }} <button @click="addCount">+1</button>
    </div>
  </div>
</template>
<script>
// 1. 定义混入( 组件内的js导出对象怎么写，混入就怎么写)
const mixin = {
  data() {
    return {
      count: 1
    }
  },
  methods: {
    addCount() {
      this.count++
    }
  }
}

// const add = () => {
//   return '浪哥很帅'
// }
export default {
  name: 'Approvals',
  // 2.注册混入
  mixins: [mixin]
}
</script>
